package com.share.demo.zkclient;

import org.I0Itec.zkclient.ZkClient;
import org.I0Itec.zkclient.ZkConnection;

/**
*
* @date 2018/01/03
* @author caifan 
*
*/
public class ZKClientDemo {
    public static final int SECOND = 1000;
    public ZkClient getConnection(String host) {
        return new ZkClient(host, 5 * SECOND);
    }

    public static void main(String[] args) {
        ZKClientDemo zkClientDemo = new ZKClientDemo();
        zkClientDemo.getConnection("192.168.2.10:2181");
        System.out.println("server connecting success");
//        ZkConnection zkConnection = new ZkConnection();
    }
}
